﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>ECharts</title>
  
  <script src="./js/echarts.js"></script>
<!--
    <script src="../Echarts3/js/echarts.min.js"></script>
	<script src="echarts.min.js"></script>
	-->
</head>
 
<body>
    <div id="main" style="height:200px;border:1px solid #ccc;padding:10px;"></div>
    
    <script type="text/javascript">
    require.config({
        paths: {
            echarts: './js'
        }
    });
    
    require(
        [
            'echarts',
            'echarts/chart/bar',
            'echarts/chart/line'
        ],
        function (ec) {
            var myChart = ec.init(document.getElementById('main'));
            myChart.setOption({
  "title": {
    "text": "bar",
    "x": "center"
  },
  "tooltip": {
    "show": false,
    "trigger": "axis"
  },
  "legend": {
    "show": false,
    "x": "left",
    "y": "bottom",
    "data": ["qwe", "升序"]
  },
  "grid": {
//	show : true,
//  "top": 0,
    "left": 0,
    "right": 0,
    "bottom": 0,
    "containLabel": true
  },
  "toolbox": {
    "show": false,
    "feature": {
      "mark": {
        "show": false
      },
      "dataView": {
        "show": false,
        "readOnly": false
      },
      "magicType": {
        "show": false,
        "type": [
          "line",
          "bar"
        ]
      },
      "restore": {
        "show": false
      },
      "saveAsImage": {
        "show": true
      }
    }
  },
  "calculable": false,
  "xAxis": [
    {
      "type": "category",
      "axisLabel": {
        "rotate": -45
      },
      "data": [
        "2015",
        "2013",
        "2016",
        "2014",
        "2012",
        "2011",
        "2004",
        "2006",
        "2010",
        "2007",
        "2003",
        "2008",
        "2009",
        "2005"
      ]
    }
  ],
  "yAxis": [
    {
      "type": "value",
      "min": "dataMin",
      "max": "dataMax"
    }
  ],
  "series": [
    {
      "name": "qwe",
      "type": "bar",
      "data": [
        3.701159937,
        6.027244693,
        0.329599613,
        5.364547066,
        3.373408883,
        6.025766496,
        3.131440367,
        2.596246916,
        5.310963002,
        2.078204246,
        2.620689655,
        7.883888529,
        3.854260506,
        4.861192259
      ]
    },
    {
      "name": "升序",
      "type": "bar",
      "data": [
        0.4117647058823529,
        2.8333333333333335,
        3,
        3.142857142857143,
        3.789473684210526,
        5.9523809523809526,
        7,
        7.5,
        8.7,
        11.5,
        12,
        14.5,
        25,
        58
      ]
    }
  ],
  "noDataLoadingOption": {
    "text": "暂无数据",
    "effect": "bubble",
    "effectOption": {
      "backgroundColor": "#fff",
      "effect": {
        "n": 0
      }
    },
    "textStyle": {
      "fontSize": 20
    }
  }
});
        }
    );
    </script>
</body>
</html>